package com.it.a09threadsafe1;

public class ThreadDemo {
    public static void main(String[] args) {
        /*
            需求：
                某电影目前正在上映国产大片，共有100张门票，而它有3个窗口卖票，设计一个程序模拟该电影院卖票
         */

        MyThread t1 = new MyThread();
        MyThread t2 = new MyThread();
        MyThread t3 = new MyThread();

        t1.setName("窗口1");
        t2.setName("窗口2");
        t3.setName("窗口3");

        t1.start();
        t2.start();
        t3.start();
    }
}
